<div class="layui-fluid" id="lay_app_index">
  <div class="layui-row layui-col-space15">
    <div class="layui-col-md8">
      <div class="layui-row layui-col-space15">
        <script type="text/html" template lay-url="ajax.php" lay-type="post" lay-data="{act:'count'}">
          <div class="layui-col-sm6 layui-col-md4">
            <div class="layui-card">
              <div class="layui-card-header">
                成功调用量
                <span class="layui-badge layui-bg-blue layuiadmin-badge">日·次</span>
              </div>
              <div class="layui-card-body layuiadmin-card-list">
                <p class="layuiadmin-big-font">{{d.login.day}}</p>
                <p>
                  接口调用量
                  <span class="layuiadmin-span-color">{{d.api.day}}<i class="layui-icon">&#xe66c;</i></span>
                </p>
              </div>
            </div>
          </div>
          <div class="layui-col-sm6 layui-col-md4">
            <div class="layui-card">
              <div class="layui-card-header">
                当前用户数量
                <span class="layui-badge layui-bg-green layuiadmin-badge">人</span>
              </div>
              <div class="layui-card-body layuiadmin-card-list">

                <p class="layuiadmin-big-font">{{d.user.use}}</p>
                <p>
                  最大用户数量
                  <span class="layuiadmin-span-color">{{d.user.all}} <i class="layui-icon">&#xe770;</i></span>
                </p>
              </div>
            </div>
          </div>
          <div class="layui-col-sm6 layui-col-md4">
            <div class="layui-card">
              <div class="layui-card-header">
                当前应用量
                <span class="layui-badge layui-bg-orange layuiadmin-badge">个</span>
              </div>
              <div class="layui-card-body layuiadmin-card-list">

                <p class="layuiadmin-big-font">{{d.app.use}}</p>
                <p>
                  最大应用量
                  <span class="layuiadmin-span-color">{{d.app.all}} <i class="layui-icon">&#xe7ae;</i></span>
                </p>
              </div>
            </div>
          </div>
        </script>

        <div class="layui-col-sm12">
          <div class="layui-card">
            <div class="layui-card-header" id="title">新增站点</div>
            <div class="layui-card-body">
              <div class="layui-form layui-form-pane" lay-filter="web">
                <input id="uid" name="uid" value="" autocomplete="off" class="layui-input layui-hide">
                <div class="layui-form-item">
                  <label class="layui-form-label"
                    style="height:auto;overflow:visible;text-overflow:inherit;">站点名称：</label>
                  <div class="layui-input-block">
                    <input type="text" name="webname" lay-verify="required" lay-reqText="站点名称不能为空！" autocomplete="off"
                      placeholder="你的站点名称（必填）" class="layui-input">
                  </div>
                </div>

                <div class="layui-form-item">
                  <label class="layui-form-label"
                    style="height:auto;overflow:visible;text-overflow:inherit;">站点域名：</label>
                  <div class="layui-input-block">
                    <input type="text" name="weburl" lay-verify="required|url" lay-reqText="站点域名不能为空！"
                      autocomplete="off" placeholder="你的站点域名 不要带http(s)://" class="layui-input">
                  </div>
                </div>

                <div class="layui-form-item">
                  <label class="layui-form-label"
                    style="height:auto;overflow:visible;text-overflow:inherit;">备用域名：</label>
                  <div class="layui-input-block">
                    <input type="text" name="url" lay-verify="url" autocomplete="off" placeholder="可留空 不要带http(s)://"
                      class="layui-input">
                  </div>
                </div>

                <div class="layui-form-item" pane="">
                  <label class="layui-form-label"
                    style="height:auto;overflow:visible;text-overflow:inherit;">开启昵称头像</label>
                  <div class="layui-input-block">
                    <input type="checkbox" name="name_img" lay-skin="switch" lay-text="开启|关闭" checked>
                  </div>
                </div>

                <div class="layui-form-item" pane="">
                  <label class="layui-form-label"
                    style="height:auto;overflow:visible;text-overflow:inherit;">是否启用</label>
                  <div class="layui-input-block">
                    <input type="checkbox" name="status" lay-skin="switch" lay-text="启用|关闭" checked>
                  </div>
                </div>
                <div class="layui-form-item">
                  <div class="layui-input-block">
                    <div class="layui-col-xs8 layui-col-md6 layui-col-md-offset2">
                      <button id="button" type="submit" class="layui-btn layui-btn-default layui-btn-fluid"
                        lay-submit="" lay-filter="add">新增</button>
                    </div>
                  </div>
                </div>

              </div>
            </div>
          </div>

          <div class="layui-card">
            <div class="layui-card-header">站点列表</div>
            <div class="layui-card-body">
              <div style="padding-bottom: 10px;">
                <button type="button" class="layui-btn layui-btn-danger" onclick="resetweb();"><i
                    class="layui-icon layui-icon-refresh" lay-tips="重置站点列表" lay-offset="5"></i></button>
              </div>
              <table id="web_table" lay-filter="web_table"></table>
            </div>
          </div>

          <script type="text/html" id="web_bar">
            <a class="layui-btn layui-btn-default layui-btn-xs" lay-event="more">更多</a>
            <a class="layui-btn layui-btn-danger layui-btn-xs" lay-event="del">删除</a>
          </script>
          <script type="text/html" id="copy-appid">
            <div class="copy-appid" data-clipboard-text="{{d.appid}}">{{d.appid}}</div>
          </script>
          <script type="text/html" id="copy-token">
            <div class="copy-token" data-clipboard-text="{{d.token}}">{{d.token}}</div>
          </script>

        </div>
      </div>
    </div>
    <div class="layui-col-md4">
      <script type="text/html" template lay-url="ajax.php" lay-type="post" lay-data="{act:'info'}">
        <div class="layui-card">
          <div class="layui-card-header">个人信息</div>
          <div class="layui-card-body layui-text">
            <table class="layui-table" style="table-layout:fixed;">
              <tbody>
                <tr>
                  <td>我的分组</td>
                  <td>
                    {{ d.uservip }}
                    <button class="layui-btn layui-btn-xs layui-btn-default" lay-href="/pay"
                      style="padding-left: 5px;">充值会员</button>
                  </td>
                </tr>
                <tr>
                  <td>UID</td>
                  <td style="word-wrap:break-word;">
                    {{ d.uid }}<button style="margin-left:2%;" type="button"
                      class="layui-btn layui-btn-default layui-btn-xs copy-btn" data-clipboard-text="{{ d.uid }}">
                      <i class="layui-icon layui-icon-file"></i>
                    </button>
                  </td>
                </tr>
                <tr>
                  <td>邮箱</td>
                  <td style="word-wrap:break-word;">{{ d.mail }}</td>
                </tr>
                <tr>
                  <td>套餐量</td>
                  <td>
                    {{ d.usernum }}
                  </td>
                </tr>
                <tr>
                  <td>签到量</td>
                  <td>
                    <span id="signnum">{{ d.signnum }}</span><button class="layui-btn layui-btn-xs layui-btn-default"
                      layadmin-event="sign" style="margin-left: 5px;">每日签到</button>
                  </td>
                </tr>
              </tbody>
            </table>
          </div>
        </div>

        <div class="layui-card">
          <div class="layui-card-header">系统状态</div>
          <div class="layui-card-body layadmin-takerates layui-text">
            <table class="layui-table">
              <colgroup>
                <col width="100">
                <col>
              </colgroup>
              <tbody>
                <tr>
                  <td>API接口</td>
                  <td>
                    {{ d.apiurl }}<button style="margin-left:2%;" type="button"
                      class="layui-btn layui-btn-default layui-btn-xs copy-btn" data-clipboard-text="{{ d.apiurl }}">
                      <i class="layui-icon layui-icon-file"></i>
                    </button>
                  </td>
                </tr>
                <tr>
                  <td>QQ登录</td>
                  <td>
                    {{ d.qq_login }}
                  </td>
                </tr>
                <tr>
                  <td>微信登录</td>
                  <td>
                    {{ d.wx_login }}
                  </td>
                </tr>
                <tr>
                  <td>在线支付</td>
                  <td>{{ d.pay }}</td>
                </tr>
                <tr>
                  <td>限制功能</td>
                  <td>
                    {{ d.limit }}
                  </td>
                </tr>
              </tbody>
            </table>
          </div>
        </div>
      </script>

      <div class="layui-card">
        <div class="layui-card-header">
          温馨提示
          <i class="layui-icon layui-icon-tips" lay-tips="你看明白了吗？没看明白请联系客服" lay-offset="5"></i>
        </div>
        <div class="layui-card-body layui-text layadmin-text">
          <p> 点击右上角有更多的选项，点击你的头像可以退出以及账户相关操作。</p>
          <p>调用量：即你的站点调用快捷登录API的次数，每日0点刷新可任意调用</p>
          <p>用户量：即你的站点通过API登录成功的用户，每站点每用户只计一次</p>
          <p>套餐量、签到量：即通过签到和充值所得，与用户量关系为 最大用户量=系统默认基础用户量+套餐量+签到量</p>
          <p>应用量：即你可开通的最大站点，超过后可充值套餐量或联系管理员直接帮你添加站点。换算比列为1:500</p>
        </div>
        <div class="layui-btn-container" style="margin-left: 20px;">
          <a href="../?act=doc" target="_blank" class="layui-btn layui-btn-danger">开发文档</a>
          <script type="text/html" template>
            <a href="{{ layui.data(layui.setter.tableName).author }}" target="_blank" class="layui-btn">寻求帮助</a>
          </script>
        </div>
      </div>

    </div>
  </div>
</div>


<script>
  layui.use('console', layui.factory('console'));
</script>